<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增巷道')"/>
    <th:block th:include="include :: select2-css"/>
</head>
<body>
<div class="main-content">
    <form id="form-user-add" class="form-horizontal">
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">巷道号：</label>
                    <div class="col-sm-8">
                        <input name="roadway_id" placeholder="请输入巷道号" autocomplete="off" class="form-control" type="text" maxlength="30"
                               required>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label is-required">仓库id：</label>
                    <div class="col-sm-8">
                        <input name="warehouse_id" placeholder="请输入仓库id" class="form-control"autocomplete="off" type="text" maxlength="30"
                        required>
                    </div>
                </div>
            </div>

        </div>
        <div class="row">

            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">巷道名称：</label>
                    <div class="col-sm-8">
                        <input id="roadway_name" name="roadway_name" placeholder="请输入巷道名称" class="form-control" autocomplete="off"
                               type="text" maxlength="30">

                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label ">设备id：</label>
                    <div class="col-sm-8">
                        <input id="device_id" name="device_id"class="form-control" placeholder="请输入设备id"autocomplete="off"  type="text"
                               maxlength="30"  >
                    </div>
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">入库锁：</label>
                    <div class="col-sm-8">
                        <select name="in_locked" class="form-control m-b" required>
                            <option value="N">未锁定</option>
                            <option value="Y">锁定</option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="col-sm-4 control-label">出库锁：</label>
                    <div class="col-sm-8">
                        <select name="out_locked" class="form-control m-b" required>
                            <option value="N">未锁定</option>
                            <option value="Y">锁定</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <!--<div class="row">-->
            <!--<div class="col-sm-6">-->
                <!--<div class="form-group">-->
                    <!--<label class="col-sm-4 control-label ">出库端入库锁：</label>-->
                    <!--<div class="col-sm-8">-->
                        <!--<input id="in_locked1" name="in_locked1"class="form-control" placeholder="请输入出库端入库锁"autocomplete="off"  type="text"-->
                               <!--maxlength="30" >-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="col-sm-6">-->
                <!--<div class="form-group">-->
                    <!--<label class="col-sm-4 control-label ">出库端二楼入库锁：</label>-->
                    <!--<div class="col-sm-8">-->
                        <!--<input id="in_locked2" name="in_locked2"class="form-control" placeholder="请输入出库端二楼入库锁"autocomplete="off"  type="text"-->
                               <!--maxlength="30" >-->
                    <!--</div>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
    </form>
</div>

<div class="row">
    <div class="col-sm-offset-5 col-sm-10">
        <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存
        </button>&nbsp;
        <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭
        </button>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: select2-js"/>
<script>
    var prefix = ctx + "device/basRoadway";

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-user-add").serializeArray();
            $.operate.saveTab(prefix + "/add", data);
        }
    }
</script>
</body>
</html>